package org.xsk.mall.common.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * description: 分页工具
 * <p>
 * date: 2021/8/19 13:08
 * author: x-one
 */
public class PageUtils {
    private PageUtils(){}

    /**
     * 请求参数组装Page对象
     * @param pagination
     * @param <T>
     * @return
     */
    public static <T> Page<T> toPage(Pagination pagination){return new Page<>(pagination.getPageNum(),pagination.getPageSize());}
}
